<!DOCTYPE HTML>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport"
		content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,aItemress=no">
	<title>拼团详情</title>
	<link rel="stylesheet" type="text/css" href="../../../css/aui.css" />
	<link rel="stylesheet" type="text/css" href="../../../css/app.css" />
	<style type="text/css">
		body {
			background-color: #fff;
		}

		.pintuan-header {
			display: flex;
			/*align-items: center;*/
			width: 100%;
			height: 3.3rem;
			flex-direction: row;
			padding: 0 0.75rem;
			margin-bottom: 0.5rem;
			background-color: #fff;
		}

		.pintuan-price {
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: flex-end;
			margin-top: 0.3rem;
			position: relative;
		}

		.pintuan_img {
			width: 1.8rem;
			height: 1.8rem;
			border-radius: 50%;
			/*margin: .75rem;
			margin-right: 0;*/
		}

		.btn_pintuan {
			width: 5rem;
			height: 1.5rem;
			background: linear-gradient(135deg, rgba(132, 229, 255, 1) 0%, rgba(107, 180, 255, 1) 100%, rgba(122, 174, 229, 1) 100%);
			border-radius: 0.8rem;
			line-height: 1.5rem;
			text-align: center;
			font-size: .7rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(255, 255, 255, 1);
			align-self: center;
		}

		.newproduct {
			height: 2.65rem;
			background: rgba(255, 255, 255, 1);
			border-bottom: .05rem solid rgba(238, 238, 238, 0.5);
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 0 0.75rem;
			margin-top: 0.3rem;
		}

		.new_wraper {
			border-bottom: 0.5rem solid #F6F6F6;
		}

		.newproduct_left {
			background: url();
			background-repeat: no-repeat;
			background-size: auto 0.8rem;
			background-position: left center;
			padding-left: 10px;
			display: inline-block;
			font-size: 0.85rem;
			font-family: PingFangSC-Semibold;
			font-weight: 600;
			color: rgba(51, 51, 51, 1);
		}

		.newproduct_right span {
			font-size: 0.65rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(102, 102, 102, 1);
		}

		.newproduct_list {
			/*height: 6.75rem;*/
			background: rgba(255, 255, 255, 1);
			padding: 0 0.75rem;
			display: flex;
			box-sizing: border-box;
			padding-top: 0.75rem;
		}

		.left_img {
			width: 4rem;
			height: 4rem;
			margin-right: 0.75rem;
		}

		.left_img img {
			width: 4rem;
			height: 4rem;
			border-radius: .1rem;
		}

		.right_cont {
			width: 12.5rem;
			border-bottom: .05rem solid rgba(238, 238, 238, 0.5);
		}

		.top_title {
			display: inline-block;
			width: 100%;
			font-size: .8rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(34, 34, 34, 1);
		}

		.top_title img {
			width: 1.6rem;
			height: 0.9rem;
			display: inline-block;
			transform: translateY(0.15rem);
			margin-right: 0.2rem;
		}

		.top_title span {
			font-size: 0.8rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: #222222;
			line-height: 1.1rem;
			/*display: inline-block;*/
		}

		.mid_decri {
			/*display: flex;*/
		}

		.mid_decri_item {
			padding: 0 0.25rem;
			font-size: 0.5rem;
			font-weight: 400;
			color: rgba(255, 102, 66, 1);
			font-family: PingFangSC-Regular;
			background: rgba(255, 102, 66, 0.1);
			/*text-align: center;*/
			float: left;
			margin-top: 0.3rem;
			margin-right: 0.25rem;
			margin-bottom: 0.4rem;
			padding-top: 0.010rem;
			border-radius: 0.1rem;
		}

		.clear {
			clear: both;
		}

		.now_price {
			font-size: 1.1rem;
			font-family: 'PingFangSC-Semibold';
			font-weight: 600;
			color: rgba(255, 102, 66, 1);
			line-height: 1rem;
		}

		.btn_pintuan_again {
			width: 17.25rem;
			height: 2.3rem;
			background: linear-gradient(135deg, rgba(132, 229, 255, 1) 0%, rgba(107, 180, 255, 1) 100%, rgba(122, 174, 229, 1) 100%);
			border-radius: 1.15rem;
			font-size: 0.8rem;
			font-family: PingFangSC-Medium;
			font-weight: 500;
			color: rgba(255, 255, 255, 1);
			line-height: 2.3rem;
			text-align: center;
			margin: auto;
		}

		.time-lable {
			display: inline-block;
			width: .85rem;
			height: .85rem;
			line-height: .85rem;
			text-align: center;
			background: rgba(255, 102, 66, 1);
			border-radius: .1rem;
			color: #fff;
			font-size: .5rem;
			font-family: PingFangSC-Medium;
			font-weight: 500;
			color: rgba(255, 255, 255, 1);
		}

		.aui-btn-block {
			display: inline-block;
			width: 90%;
			height: 2.3rem;
			line-height: 2.3rem;
			text-align: center;
			margin: auto;
			margin-top: 1.5rem;
			position: absolute;
			left: 50%;
			transform: translateX(-50%);
			font-size: .8rem;
			font-family: PingFangSC-Medium;
			font-weight: 500;
			color: rgba(255, 255, 255, 1);
			background: rgba(0, 90, 147, 1);
			border-radius: 6px;
		}

		.aui-btn-block2 {
			display: inline-block;
			width: 90%;
			height: 2.3rem;
			line-height: 2.3rem;
			text-align: center;
			margin: 0 auto;
			margin-top: 1rem;
			margin-bottom: 1rem;

			font-size: .8rem;
			font-family: PingFangSC-Medium;
			font-weight: 500;
			color: rgba(255, 255, 255, 1);
			background: rgba(0, 90, 147, 1);
			border-radius: 6px;
		}

		.btn-bg {
			width: 100%;
			float: left;
		}

		.tuan_detail {
			background-color: #fff;
			display: inline-block;
			height: 7.85rem;
			width: 100%;
			position: relative;
		}

		.tuan_time {
			display: inline-block;
			width: 100%;
			margin-top: 1.5rem;
			font-size: .75rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(51, 51, 51, 1);
			text-align: center;
		}

		.info-header {
			display: inline-block;
			margin-top: .75rem;
		}

		.info-person {
			margin-left: 0.5rem;
			margin-right: auto;
			margin-top: 0.65rem;
		}

		.info-person>div:nth-child(1) {
			font-size: .65rem;
			font-family: PingFangSC-Semibold;
			font-weight: 600;
			color: rgba(51, 51, 51, 1);
		}

		.info-person>div:nth-child(2) {
			font-size: .6rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(153, 153, 153, 1);
		}

		.price_item {
			font-size: .7rem;
			color: #FF6642;
			font-family: PingFangSC-Semibold;
			font-weight: 600;
		}

		.price_current {
			font-size: 1.1rem;
			color: #FF6642;
			font-family: PingFangSC-Semibold;
			font-weight: 600;
		}

		.price_del {
			color: rgba(153, 153, 153, .7);
			font-size: .7rem;
			font-weight: 400;
			color: rgba(153, 153, 153, 1);
		}

		.success {
			height: 9.7rem;
			width: 100%;
			background-color: #fff;
			padding: 0 .75rem;
		}

		.success img {
			display: inline-block;
			width: 1.1rem;
			height: 1.1rem;
			margin-left: 50%;
			transform: translateX(-50%);
			margin-top: 1.7rem;
		}

		.completed {
			width: 100%;
			text-align: center;
			font-size: .75rem;
			font-family: PingFangSC-Regular;
			font-weight: 400;
			color: rgba(51, 51, 51, 1);
		}

		.success-next {
			margin-top: 1.5rem;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}

		.success-next>span:nth-child(1) {
			display: inline-block;
			width: 8.35rem;
			height: 2.3rem;
			line-height: 2.3rem;
			text-align: center;
			border: 1px solid #72D5EF;
			border-radius: 1.15rem;
			font-size: .8rem;
			font-family: PingFangSC-Medium;
			font-weight: 500;
			color: rgba(114, 213, 239, 1);
		}

		.success-next>span:nth-child(2) {
			display: inline-block;
			width: 8.35rem;
			height: 2.3rem;
			line-height: 2.3rem;
			text-align: center;
			background: linear-gradient(135deg, rgba(132, 229, 255, 1) 0%, rgba(107, 180, 255, 1) 100%, rgba(122, 174, 229, 1) 100%);
			border-radius: 1.15rem;
			font-size: .8rem;
			font-family: PingFangSC-Medium;
			font-weight: 500;
			color: rgba(255, 255, 255, 1);
			margin-left: .3rem;
		}

		.rego {
			margin-top: 1.5rem;
			position: relative;
		}

		.rego>span {
			display: inline-block;
			position: absolute;
			left: 50%;
			transform: translateX(-50%);
			background: linear-gradient(135deg, rgba(132, 229, 255, 1) 0%, rgba(107, 180, 255, 1) 100%, rgba(122, 174, 229, 1) 100%);
			color: #fff;
			width: 17.25rem;
			text-align: center;
			height: 2.3rem;
			line-height: 2.3rem;
			border-radius: 1.15rem;
		}

		.box {
			width: 100%;
			height: 6.8rem;
			background: #fbfbfb;
		}

		.preview_box {
			width: 90%;
			margin: auto;
			padding: 0.45rem;
			height: 6rem;
			background: #fff;
			margin-top: 0.8rem;
			border-radius: 0.4rem;

		}

		.preview_img {
			width: 30%;
			height: 100%;
			float: left;
		}

		.preview_img img {
			width: 5rem;

		}

		.preview_data {
			width: 70%;
			height: 100%;
			float: left;
			padding-left: 0.5rem;
		}

		.preview_text {
			width: 100%;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: normal;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 2;
			font-size: 0.7rem;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: rgba(77, 77, 77, 1);
		}

		.preview_number {
			width: 100%;
			height: 50%;
			margin-top: 0.5rem;
		}

		.present_price {
			width: 100%;
			float: left;
		}

		.present_price>span:nth-child(1) {
			font-size: 0.7rem;
			color: rgba(233, 0, 0, 1);
		}

		.present_price>span:nth-child(2) {
			font-size: 1.1rem;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: rgba(233, 0, 0, 1);
		}

		.preview_left {
			width: 50%;
			height: 100%;
			float: left;
		}

		.preview_right {
			width: 50%;
			height: 100%;
			float: left;
		}

		.preview_left>div:nth-child(1) {
			width: 100%;
			height: 50%;
			font-size: 0.7rem;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: rgba(179, 179, 179, 1);
		}

		.preview_left>div:nth-child(2) {
			width: 100%;
			height: 50%;
			font-size: 0.7rem;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			float: left;
			color: rgba(179, 179, 179, 1);
			padding-top: 0.2rem;
		}

		.tuan_box {
			background: rgba(227, 244, 255, 1);
			border-radius: 0.1rem;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: rgba(0, 90, 147, 1);
			font-size: 0.6rem;
			padding: 0.15rem;
			margin-top: 1.3rem;
			width: 3.9rem;
			float: right;
			margin-right: 0.1rem;
		}

		.user_img {
			width: 1.7rem;
			float: left;
			margin:0 0.25rem 0.5rem;
			margin-bottom: 0.5rem;
			display:inline-block
		}
		.user_img2 {
			width: 1.7rem;
			margin:0 0.28rem 0.5rem;
			display:inline-block
		}
		.user_img2.mt{
			margin-left:-0.28rem
		}
		.time_text {
			width: 0.9rem;
			height: 0.9rem;
			background: rgba(0, 90, 147, 1);
			border-radius: 0.1rem;
			color: rgba(255, 255, 255, 1);
			padding-right: 0.15rem;
			padding-left: 0.15rem;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
		}

		.time_dian {
			font-weight: 500;
			color: rgba(0, 90, 147, 1);
		}

		.group_surplus_time {
			width: 100%;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: rgba(46, 46, 46, 1);
			font-size: 0.75rem;
			height: 2.5rem;
			margin-top: 0.5rem;
			float: left;

		}

		.user_name {
			width: 3.55rem;
			/*float: left;*/
			text-overflow: ellipsis;
			white-space: nowrap;
			overflow: hidden;
			padding-top: 0.2rem;
			color: rgba(46, 46, 46, 1);
			margin-left: 0.2rem;
			font-size: 0.7rem;
		}

		.see_block {
			display: inline-block;
			width: 90%;
			margin: auto;
			height: 2.3rem;
			line-height: 2.3rem;
			text-align: center;

			position: absolute;
			left: 50%;
			transform: translateX(-50%);
			font-size: .7rem;
			font-family: PingFangSC-Medium;
			font-weight: 400;
			color: rgba(0, 90, 147, 1);
			/* background: rgba(0,90,147,1); */
			border-radius: 6px;
		}

		.see_block2 {
			width: 100%;
			height: 2.3rem;
			line-height: 2.3rem;
			text-align: center;
			font-size: .7rem;
			font-family: PingFangSC-Medium;
			font-weight: 400;
			color: rgba(0, 90, 147, 1);
			border-radius: 6px;
			display: block;
		}

		.img_area img {
			border-radius: 5rem;
			;
		}

		.group_surplus_time .user_img {
			border-radius: 5rem;
		}

		.pintuan_wrapper {
			display: flex;
			justify-content: center;
			flex-direction: column;
			align-items: center;
		}
	</style>
</head>

<body>
	<div id="app" v-cloak="">
		<!-- <div class="pintuan-header">
			<div class="info-header">
				<img class="pintuan_img" :src="tuan_uid.leader_avatar" />
			</div>
			<div class="info-person">
				<div>{{tuan_uid.leader_nickname}}</div>
				<div>发起了{{good.tuan_uid_num}}人团</div>
			</div>
			<div class="btn_pintuan" tapmode onclick="open_win('pintuan','pintuan.html',false)">
				查看我的拼团
			</div>
		</div> -->

		<!-- 商品信息 -->
		<!-- <div class="new_wraper">
			<div class="newproduct_list flex-box-x" tapmode @click="openWin_goods_detail(good.id)">

				<div class="left_img">
					<img :src="good.cover" style="border-radius:0.2rem;">
				</div>

				<div class="right_cont col-xs-x">
					<div class="top_title aui-ellipsis-2">{{good.title}}</div>
					<div class="mid_decri">
						<div class="mid_decri_item" style="">{{good.tuan_uid_num}}人成团</div>
					</div>
					<section class="clear"></section>
					<div style="padding-bottom:.45rem;">
						<span class="price_item">
							<span class="price_current" style="font-size:0.7rem;font-family:PingFangSC-Semibold;">￥
								<span style="font-family:Akrobat-Bold;font-size:1.1rem;">{{good.tuan_price/100}}</span>
							</span>
						</span>
						<del class="price_del" style="color:rgba(153,153,153,.7);font-size: .7rem;font-weight:400;">￥334</del>
					</div>
				</div>
			</div>
		</div> -->
		<!-- 商品信息 -->
		<div class="box">
			<div class="preview_box">
				<div class="preview_img" @click="openWin_goods_detail(good.good_id)">
					<img :src="good.cover" alt="">
				</div>
				<div class="preview_data">
					<div class="preview_text" @click="openWin_goods_detail(good.good_id)">
						{{good.title}}
					</div>
					<div class="preview_number">
						<div class="preview_left">
							<div class="present_price">
								<span>￥</span><span>{{good.tuan_price/100}}</span>
							</div>
							<div class="" style=" text-decoration: line-through;">￥{{good.cost_price}}</div>
						</div>
						<div class="preview_right">
							<div class="tuan_box">
								<img src="../../../image/btn/label2.png"
									style="float: left;width: 0.6rem;margin-top: 0.1rem;margin-left: 0.2rem;" alt="">
								{{good.tuan_uid_num}}人成团
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!--拼团详情-邀请好友-->
		<div class="" style="width:100%;float:left;">
			<div class="" v-if="result.status!=2&&result.status!=1"
				style="margin-top: 0.5rem;width:100%;text-align:center;font-size: 0.75rem;">
				还差 &nbsp<span style="color:rgba(0,90,147,1);font-size:0.75rem;">{{tuan_uid.untuan_uid_num}}人</span>&nbsp
				拼团成功
				&nbsp 还剩
				<span class="time_text">{{lefttime.substr(0,2)}}</span>
				<span class="time_dian">:</span>
				<span class="time_text">{{lefttime.substr(3,2)}}</span>
				<span class="time_dian">:</span>
				<span class="time_text">{{lefttime.substr(6,2)}}</span>
			</div>

			<div class="" v-else-if="result.status==2"
				style="margin-top: 0.5rem;width:100%;text-align:center;font-size: 0.75rem;">
				该团未能按时凑齐人数，拼团失败
			</div>
			<div class="" v-else style="margin-top: 0.5rem;width:100%;text-align:center;font-size: 0.75rem;">
				恭喜您拼团成功
			</div>


			<div class="group_surplus_time" style="height:3rem;text-align:center;">
				<img class="user_img" :src="tuan_uid.leader_avatar" style="margin-top: 0.3rem;margin-left:6rem;" alt="">
				<div class="" style="float:left;margin-left:0.3rem; text-align: left">
					<div class="user_name" style="text-align: left;">{{tuan_uid.leader_nickname}}</div>
					<div class=""
						style="float:left;font-size:0.6rem;font-family:PingFangSC-Regular,PingFang SC;text-align: left;font-weight:400;color:rgba(128,128,128,1);margin-left:0.2rem;">
						发起了{{good.tuan_uid_num}}人团</div>
				</div>
				<img v-if="result.status==1" src="../../../image/btn/success.png" alt=""
					style="width: 3.95rem;height: 2.95rem;float: right;margin-right: 0.9rem;margin-top:-0.7rem">
				<img v-else-if="result.status==2" src="../../../image/btn/fail.png" alt=""
					style="width: 3.95rem;height: 2.95rem;float: right;margin-right: 0.9rem; margin-top:-0.7rem">
				<span v-else></span>
			</div>
			<div class="img_area"
				style="width:100%;box-sizing:border-box; margin-bottom:0.5rem; text-align: center;">
				<div style="margin:0 auto;display: inline-block;text-align:left;padding-left:3.6%;">
				<span><img class="user_img2"  :src="tuan_uid.leader_avatar" alt="" ></span>
				<!-- good.tuan_uid_num -->

				<span v-for="item in member">
					<img class="user_img2"  :src="item.avatar" alt="">
				</span>
				<span v-for="item in untuan_uid_num">
					<img class="user_img2" v-if="result.status=='2'" src="../../../image/icons/pintuan.png" alt="">
					<img class="user_img2" v-if="result.status=='3'" src="../../../image/btn/user_tuan_img.png" alt="">
				</span>
				<!-- <span v-for="item in member" v-else>
					<img class="user_img2" :src="item.avatar" alt="">
				</span> -->

				<!-- {{ good.tuan_uid_num}} -->

			</div>

			</div>
		</div>
		<div v-if="result.status==3" tapmode onclick="openSharebox()" class=""
			style="width:100%;float:left; text-align: center;">
			<div class="aui-btn-block2">
				邀请好友参团
			</div>
		</div>
		<div v-else-if="result.status==4" tapmode onclick="showAttr()" class="ming-padded-0-10 btn-bg"
			style="width:100%;float:left; text-align: center;">
			<div class="aui-btn-block2">
				我要参团
			</div>
		</div>
		<!--拼团成功-->



		<div v-else-if="result.status==1" tapmode class="ming-padded-0-10 btn-bg " style="width:100%;float:left; text-align: center;">
			<!-- <span style="display: block; color:rgba(233,0,0,1);">恭喜您拼团成功</span> -->
			<div class="aui-btn-block2" @click="open_win('group_goods_list','../../goods/group_goods_list.html',false)">
				<!-- 重新去拼团 -->
				更多拼团商品
			</div>
			<div @click="openWin_order_detail(tuan_uid.order_id)" style="font-size:0.7rem;color:#005A93;text-align: center;padding:0.5rem 0;margin-top:-0.5rem;">
				查看订单详情
			</div>
			<!-- <div class="" style="width:100%;float:left;text-align: center;">
				<div class="see_block2" tapmode onclick="open_win('pintuan','pintuan.html',false)">
					查看我的拼团
				</div>


			</div> -->
		</div>

		<!--拼团失败-->
		<div v-else tapmode style="width:100%;text-align: center;float:left;" class="">
			<div class="aui-btn-block2" @click="open_win('group_goods_list','../../goods/group_goods_list.html',false)">
				重新去拼团
			</div>
		</div>


		<!-- <div class="tuan_detail" v-if="result.status!=2&&result.status!=1">
			<span class="tuan_time">
					还差<span style="color:#E64C46;padding:0 .3rem;">{{tuan_uid.untuan_uid_num}}</span>人拼团成功&nbsp剩余&nbsp&nbsp
			<span class="time-lable">{{lefttime.substr(0,2)}}</span>
			<span style="color:#FF6642;">:</span>
			<span class="time-lable">{{lefttime.substr(3,2)}}</span>
			<span style="color:#FF6642;">:</span>
			<span class="time-lable">{{lefttime.substr(6,2)}}</span>
			</span>

			<div v-if="result.status==3" tapmode onclick="openSharebox()" class="ming-padded-0-10 btn-bg">
				<div class="aui-btn-block">
					邀请好友参团
				</div>
			</div>

			<div v-if="result.status==4" tapmode onclick="showAttr()" class="ming-padded-0-10 btn-bg">
				<div class="aui-btn-block">
					我要参团
				</div>
			</div>
		</div> -->


		<!--拼团失败-->
		<!-- <div class="success" v-if="result.status==2">
			<img src="../../../image/icon/fail-select.png" style="width:1.4rem;height:1.4rem">
			<div class="completed">该团未能按时凑齐人数，拼团失败</div>
			<div class="rego">
				<span tapmode @click="open_win('group_goods_list','../../goods/group_goods_list.html',false)">重新去拼团</span>
			</div>
		</div> -->

		<!--拼团详情-拼团成功-->
		<!-- <div class="success" v-if="result.status==1">
			<img src="../../../image/icon/icon-select-red.svg">
			<div class="completed">恭喜您拼团成功</div>
			<div class="success-next">
				<span tapmode onclick="open_win('order','order.html',false)">查看订单详情</span>
				<span tapmode onclick="open_win('../../goods/group_goods_list','../../goods/group_goods_list.html',false)">更多拼团商品</span>
			</div>
		</div> -->

		<!-- <div class="" style="background-color:#fff;padding-top:1.6rem;text-align:center;" v-show="share_gold">
			<div v-show="share_show" class="aui-mask aui-mask-in" style="z-index:9999;">
				<div class="aui-text-center" style="width: 11rem;height: 155px;margin-left: calc(50vw - 110px);margin-top: calc(40vh - 78px);position: relative;">
					<img style="width: 11rem;height: 7.75rem;" src="../../image/bg/bg-share-gold.png" />
					<div class="" style="background:#fff;position: absolute;width: 100%;">
						<span style="font-size: 1.5rem;padding-bottom: .85rem;">+{{share_gold}}</span>
						<p class="aui-font-size-13" style="padding-bottom: .85rem;">恭喜您获得金币奖励</p>
					</div>
					<div align="center" @click="share_show_hide()">
						<img style="max-height: 100%;max-width: 800%;margin-top:60px;" src="../../image/bg/bg-share-gold-bottom.png" />
					</div>
				</div>
			</div>
		</div> -->

	</div>
</body>
<script type="text/javascript" src="../../../script/api.js"></script>
<script type="text/javascript" src="../../../script/vue.js"></script>
<script type="text/javascript" src="../../../script/common.js"></script>
<script type="text/javascript" src="../../../script/aui-sharebox.js"></script>
<script>
	//		剩余几人成团未返回
	var vm = new Vue({
		el: "#app",
		data: {
			id: 0,
			good: {},
			tuan_uid: {},
			untuan_uid_num: 0,
			result: {
				status: 1
			}, //1：拼团成功，去下单    2：拼团成功，已下单   3：邀请好友来拼团    4：拼团成功，下单逾期    5：拼团失败
			lefttime: '00:00:00',
			share_pic: '',
			pic_done: false,
			share_show: false,
			share_gold: 0,
			member:[]
		},
		methods: {
			get_list: function () {
				get_data('api/Tuan/tuanDetails', {
					token: $api.getStorage('token'),
					id: vm.id
				}, function (ret) {
						// alert(JSON.stringify(
						// ret,null,2
						// ))
					if (ret.status) {
						vm.good = ret.data.good
						send_event(ret.data.data)
						send_event(ret.data)
						vm.tuan_uid = ret.data.tuan_uid
						vm.untuan_uid_num = ret.data.tuan_uid.untuan_uid_num
						vm.member =ret.data.member
						vm.result = ret.data.result
						if (ret.data.result.status == 3 || ret.data.result.status == 4) {
							set_time(ret.data.tuan_uid.end_time)
						}
						if (!vm.good.cover) {
							vm.share_pic = '../../../image/logo.jpg'
							vm.pic_done = true
						} else {
							download(vm.good.cover, function (ret) {
								compress_pic(ret, function () {
									//										vm.share_pic = 'fs://share/share.png'
									vm.share_pic = ret;
									vm.pic_done = true
								})
							})
						}
					}
				})
			},
			price_format: function (type, price) {
				var price = (price / 100).toFixed(2);
				var status = (price + '').indexOf('.')
				if (status == '-1') {
					if (type == 'yuan') {
						return price;
					}
					if (type == 'fen') {
						return '00';
					}
				}
				var price_array = (price + '').split('.')
				if (type == 'yuan') {
					return price_array[0];
				}
				if (type == 'fen') {
					var price_fen = price_array[1].length < 2 ? price_array[1] + '0' : price_array[1];
					return price_fen;
				}
			}
		}
	})
	apiready = function () {

		vm.id = $api.getStorage('id')
		vm.get_list()
		// alert(vm.id)

		// fnInitPullRefresh(function() {
		// 		vm.get_list()
		// 	})
		// 新版刷新
		refresh_new(function () {
			setTimeout(function () {
				vm.get_list()
				api.refreshHeaderLoadDone()
			}, 1000)
		})
		fnInitPullRefresh(function() {
			vm.get_list();
			api.refreshHeaderLoadDone();

		})


	};
	var time_cut;

	function set_time(time) {
		var data = TimeCountDown(time);
		if (data != '0') {
			vm.lefttime = data.hours + ':' + data.minutes + ':' + data.seconds
			time_cut = setTimeout(function () {
				set_time(time)
			}, 1000)
		} else {
			vm.lefttime = '00:00:00';
			clearTimeout('time_cut');
			vm.get_list()
			send_event('tuan_ref')
		}
	}

	function joinTuan() {
		get_data('api/Tuan/joinTuan', {
			token: $api.getStorage('token'),
			id: vm.tuan_uid.id
		}, function (ret) {
			toast(ret.msg)
			if (ret.status) {
				vm.get_list()
				send_event('tuan_ref')
			}
		})
	}



	function showAttr() {
		$api.setStorage('goodsinfo', vm.good);
		$api.setStorage('tuaninfo', vm.tuan_uid);
		api.openFrame({
			name: 'set_group_sku',
			url: '../../set_group_sku.html',
			bounces: false,
			rect: {
				x: 0,
				y: 0,
				w: 'auto',
				h: 'auto'
			},
			vScrollBarEnabled: false,
			bgColor: 'rgba(0,0,0,0)'
		})
	}

	function openSharebox() {
		if (!$api.getStorage('token')) {
			openWin_login()
			return;
		}
		var sharebox = new auiSharebox();
		sharebox.init({
			frameBounces: true, //当前页面是否弹动，（主要针对安卓端）
			buttons: [{
				image: '../../../image/btn/btn-weixin.png',
				text: '微信好友',
				value: 'wx' //可选
			}, {
				image: '../../../image/btn/btn-weixin-2.png',
				text: '朋友圈',
				value: 'wx-circle'
			}],
			col: 3,
			shareTitle: '邀请好友参团' //可选,当然也可以采用下面的方式使用图标
		}, function (ret) {
			if (ret) {
				console.log(ret.buttonIndex + '/' + ret.buttonValue)
				if (ret.buttonIndex == 1) {
					shareTowx('session')
				}
				if (ret.buttonIndex == 2) {
					shareTowx('timeline')
				}
				if (ret.buttonIndex == 3) {
					shareTowb()
				}
			}
		})
	}

	function shareTowx(type) {
		var contentUrl = 'http://zm.zonmay.com/wap/share/goods/id/' + vm.good.id + '.html'
		var title = vm.good.title
		var wx = api.require('wxPlus');
		wx.isInstalled(function (ret, err) {
			if (ret.installed) { } else {
				toast('当前设备未安装微信客户端');
				return;
			}
		});
		wx.shareWebpage({
			scene: type,
			title: title,
			description: title,
			contentUrl: contentUrl,
			thumb: vm.share_pic
		}, function (ret, err) {
			if (ret.status) {
				toast('分享成功');
				get_data('api/user/shareTakeGold', {
					token: $api.getStorage('token')
				}, function (ret) {
					if (ret.status) {
						vm.share_gold = ret.data.gold
						vm.share_show = true
						setTimeout(function () {
							vm.share_show = false
						}, 300000)
					}
				})
			} else {
				if (err.code == '2') {
					toast('取消分享');
				}
				console.log(err.code);
			}
		});
	}

	function shareTowb() {
		var contentUrl = 'http://zm.zonmay.com/wap/share/goods/id/' + vm.good.id + '.html'
		var title = vm.good.title
		var weibo = api.require('weiboPlus');
		weibo.shareWebPage({
			text: title + '。详情点击链接查看',
			title: title,
			description: title,
			thumb: vm.share_pic,
			contentUrl: contentUrl
		}, function (ret, err) {
			console.log(JSON.stringify(ret))
			if (ret.status) {
				toast('分享成功');
				get_data('api/user/shareTakeGold', {
					token: $api.getStorage('token')
				}, function (ret) {
					if (ret.status) {
						vm.share_gold = ret.data.gold
						vm.share_show = true
						setTimeout(function () {
							vm.share_show = false
						}, 300000)
					}
				})
			} else {
				if (err.code == '1') {
					toast('取消分享');
				}
				console.log(JSON.stringify(err))
			}
		});
	}

	function share_show_hide() {
		vm.share_show = false;
	}
</script>

</html>
